package MySwing;

import javax.swing.JLabel;
import javax.swing.JTextField;

@SuppressWarnings("serial")
public class JFormField extends JFormComponent  {
	int textCaracateres;
	JLabel textLabel;
	JTextField textField ; 
	public JTextField getTextField() {
		return textField;
	}
	private void init()
	{
		this.textField = new JTextField(textCaracateres);
		this.textLabel = new JLabel();

	}
	public JFormField(String LabelText,int Caracteres)
	{
		this.textCaracateres = Caracteres;
		init();
		textLabel.setText(LabelText);
		addComponent();
	}
	public JFormField(String LabelText,int Caracteres,String Text)
	{
		this.textCaracateres = Caracteres;
		init();
		textLabel.setText(LabelText);
		textField.setText(Text);
		addComponent();
	}	
	@Override
	protected void addComponent() {
		// TODO Auto-generated method stub
		this.add(textLabel);
		this.add(textField);
	}
	
}
